package com.example.pceb.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.example.pceb.entity.SchoolAdmin;
import com.example.pceb.mapper.SchoolAdminMapper;
import com.example.pceb.service.SchoolAdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class SchoolAdminServiceImpl implements SchoolAdminService {
    @Autowired
    private SchoolAdminMapper schoolAdminMapper;

    @Override
    public SchoolAdmin getByUsername(String username) {
        QueryWrapper<SchoolAdmin> wrapper = new QueryWrapper<>();
        wrapper.eq("username", username);
        return schoolAdminMapper.selectOne(wrapper);
    }
}